<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: GData::Client::Base</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">GData::Client::Base</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../files/lib/gdata/client/base_rb.html">
                lib/gdata/client/base.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                Object
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
A client object used to interact with different Google Data APIs.
</p>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000025">authsub_private_key=</a>&nbsp;&nbsp;
      <a href="#M000024">authsub_token=</a>&nbsp;&nbsp;
      <a href="#M000023">authsub_url</a>&nbsp;&nbsp;
      <a href="#M000022">clientlogin</a>&nbsp;&nbsp;
      <a href="#M000020">delete</a>&nbsp;&nbsp;
      <a href="#M000015">get</a>&nbsp;&nbsp;
      <a href="#M000013">make_file_request</a>&nbsp;&nbsp;
      <a href="#M000014">make_request</a>&nbsp;&nbsp;
      <a href="#M000012">new</a>&nbsp;&nbsp;
      <a href="#M000018">post</a>&nbsp;&nbsp;
      <a href="#M000019">post_file</a>&nbsp;&nbsp;
      <a href="#M000021">prepare_headers</a>&nbsp;&nbsp;
      <a href="#M000016">put</a>&nbsp;&nbsp;
      <a href="#M000017">put_file</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">auth_handler</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
A subclass of <a href="../Auth.html">GData::Auth</a> that handles
authentication signing.

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">authsub_scope</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
The broadest AuthSub scope for working with an API. This is overriden by
the service-specific subclasses.

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">clientlogin_service</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
A default service name for ClientLogin (overriden by subclasses).

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">clientlogin_url</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
The default URL for ClientLogin.

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">headers</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
Headers to include in every request.

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">http_service</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
A subclass of <a href="../HTTP.html">GData::HTTP</a> that handles making <a
href="../HTTP.html">HTTP</a> requests.

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">source</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
A short string identifying the current application.

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">version</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
The API version being used.

</td>
        </tr>
        </table>
      </div>
    </div>
      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000012" class="method-detail">
        <a name="M000012"></a>

        <div class="method-heading">
          <a href="Base.src/M000012.html" target="Code" class="method-signature"
            onclick="popupCode('Base.src/M000012.html');return false;">
          <span class="method-name">new</span><span class="method-args">(options = {})</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000025" class="method-detail">
        <a name="M000025"></a>

        <div class="method-heading">
          <a href="Base.src/M000025.html" target="Code" class="method-signature"
            onclick="popupCode('Base.src/M000025.html');return false;">
          <span class="method-name">authsub_private_key=</span><span class="method-args">(key)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Sets a private key to use with AuthSub requests.
</p>
        </div>
      </div>

      <div id="method-M000024" class="method-detail">
        <a name="M000024"></a>

        <div class="method-heading">
          <a href="Base.src/M000024.html" target="Code" class="method-signature"
            onclick="popupCode('Base.src/M000024.html');return false;">
          <span class="method-name">authsub_token=</span><span class="method-args">(token)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Sets an AuthSub token for the service.
</p>
        </div>
      </div>

      <div id="method-M000023" class="method-detail">
        <a name="M000023"></a>

        <div class="method-heading">
          <a href="Base.src/M000023.html" target="Code" class="method-signature"
            onclick="popupCode('Base.src/M000023.html');return false;">
          <span class="method-name">authsub_url</span><span class="method-args">(next_url, secure = false, session = true, domain = nil, scope = nil)</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000022" class="method-detail">
        <a name="M000022"></a>

        <div class="method-heading">
          <a href="Base.src/M000022.html" target="Code" class="method-signature"
            onclick="popupCode('Base.src/M000022.html');return false;">
          <span class="method-name">clientlogin</span><span class="method-args">(username, password, captcha_token = nil, captcha_answer = nil, service = nil, account_type = nil)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Performs ClientLogin for the service. See <a
href="../Auth/ClientLogin.html">GData::Auth::ClientLogin</a> for details.
</p>
        </div>
      </div>

      <div id="method-M000020" class="method-detail">
        <a name="M000020"></a>

        <div class="method-heading">
          <a href="Base.src/M000020.html" target="Code" class="method-signature"
            onclick="popupCode('Base.src/M000020.html');return false;">
          <span class="method-name">delete</span><span class="method-args">(url)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Performs an <a href="../HTTP.html">HTTP</a> DELETE against the API.
</p>
        </div>
      </div>

      <div id="method-M000015" class="method-detail">
        <a name="M000015"></a>

        <div class="method-heading">
          <a href="Base.src/M000015.html" target="Code" class="method-signature"
            onclick="popupCode('Base.src/M000015.html');return false;">
          <span class="method-name">get</span><span class="method-args">(url)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Performs an <a href="../HTTP.html">HTTP</a> GET against the API.
</p>
        </div>
      </div>

      <div id="method-M000013" class="method-detail">
        <a name="M000013"></a>

        <div class="method-heading">
          <a href="Base.src/M000013.html" target="Code" class="method-signature"
            onclick="popupCode('Base.src/M000013.html');return false;">
          <span class="method-name">make_file_request</span><span class="method-args">(method, url, file_path, mime_type, entry = nil)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Sends an <a href="../HTTP.html">HTTP</a> request with the given file as a
stream
</p>
        </div>
      </div>

      <div id="method-M000014" class="method-detail">
        <a name="M000014"></a>

        <div class="method-heading">
          <a href="Base.src/M000014.html" target="Code" class="method-signature"
            onclick="popupCode('Base.src/M000014.html');return false;">
          <span class="method-name">make_request</span><span class="method-args">(method, url, body = '')</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Sends an <a href="../HTTP.html">HTTP</a> request and return the response.
</p>
        </div>
      </div>

      <div id="method-M000018" class="method-detail">
        <a name="M000018"></a>

        <div class="method-heading">
          <a href="Base.src/M000018.html" target="Code" class="method-signature"
            onclick="popupCode('Base.src/M000018.html');return false;">
          <span class="method-name">post</span><span class="method-args">(url, body)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Performs an <a href="../HTTP.html">HTTP</a> POST against the API.
</p>
        </div>
      </div>

      <div id="method-M000019" class="method-detail">
        <a name="M000019"></a>

        <div class="method-heading">
          <a href="Base.src/M000019.html" target="Code" class="method-signature"
            onclick="popupCode('Base.src/M000019.html');return false;">
          <span class="method-name">post_file</span><span class="method-args">(url, file_path, mime_type, entry = nil)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Performs an <a href="../HTTP.html">HTTP</a> POST with the given file
</p>
        </div>
      </div>

      <div id="method-M000021" class="method-detail">
        <a name="M000021"></a>

        <div class="method-heading">
          <a href="Base.src/M000021.html" target="Code" class="method-signature"
            onclick="popupCode('Base.src/M000021.html');return false;">
          <span class="method-name">prepare_headers</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Constructs some necessary headers for every request.
</p>
        </div>
      </div>

      <div id="method-M000016" class="method-detail">
        <a name="M000016"></a>

        <div class="method-heading">
          <a href="Base.src/M000016.html" target="Code" class="method-signature"
            onclick="popupCode('Base.src/M000016.html');return false;">
          <span class="method-name">put</span><span class="method-args">(url, body)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Performs an <a href="../HTTP.html">HTTP</a> PUT against the API.
</p>
        </div>
      </div>

      <div id="method-M000017" class="method-detail">
        <a name="M000017"></a>

        <div class="method-heading">
          <a href="Base.src/M000017.html" target="Code" class="method-signature"
            onclick="popupCode('Base.src/M000017.html');return false;">
          <span class="method-name">put_file</span><span class="method-args">(url, file_path, mime_type, entry = nil)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Performs an <a href="../HTTP.html">HTTP</a> PUT with the given file
</p>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>